import request from '@/utils/request'

export function page(name,sex,classId,page,pageSize) {
  return request({
    url: '/sls?name='+name+'&sex='+sex+'&classId='+classId+'&page='+page+'&pageSize='+pageSize,
    method: 'get'
  })
}
//url: `/students?/${page}/${pageSize}/${name}`,
export function add(student) {
  return request({
    url: '/students',
    method: 'post',
    data: student
  })
}

export function update(student) {
  return request({
    url: '/students',
    method: 'put',
    data: student
  })
}


export function deleteById(id) {
  return request({
    url: '/students/'+id,
    method: 'delete',
  })
}


export function selectById(id) {
  return request({
    url: '/students/'+id,
    method: 'get',
  })
}

export function studentReport(){
  return request({
    url:'/studentReport',
    method:'get',
  })
}

